import styles from './Btn.module.css';


interface BtnProps {
    text: string;
    isActive?: boolean;
    onClick?: () => void;
}
const Btn = ({text, isActive, onClick}:BtnProps) => {

    const handleClick =()=>{
        onClick?.();
    }

    return (
        <div className={`${styles.btnStyle} ${isActive?styles.btnActive:styles.btnInactive}` } onClick={handleClick}>
            {text}
        </div>
    );
}

export { Btn }
